package com.itestor.iptv.modules.common.actions;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;

import com.itestor.iptv.global.actions.AbstractPagedQueryAction;
import com.itestor.iptv.global.bean.AbstractPagedQuery;
import com.itestor.iptv.modules.ne.bean.RobotManageQuery;
import com.itestor.iptv.modules.ne.bean.RobotManageTvWallQuery;
import com.itestor.iptv.modules.ne.service.RobotManageService;

public class IndexTvWallAction extends AbstractPagedQueryAction{
	private RobotManageService robotManageService;
	
	/**
     * Logger for this class.
     */
    private static final Logger logger = Logger
            .getLogger(IndexTvWallAction.class);

    @SuppressWarnings("unchecked")
    @Override   
    public AbstractPagedQuery doPagedQuery(ActionForm form,
            HttpServletRequest request, int pagerCount, int pagerOffset)
            throws Exception {
        String name = request.getParameter("name");
        String region = request.getParameter("region");        
        String action=request.getParameter("action");
        
        
        
        RobotManageTvWallQuery robotManageQuery = new RobotManageTvWallQuery();
        robotManageQuery.setPagerPerPage(9);
        robotManageQuery.setPagerCount(pagerCount);
        robotManageQuery.setPagerOffset(pagerOffset);
        robotManageQuery.setRegion(region);
        robotManageQuery.setName(name);
        robotManageService.queryRobotManageRegionList(robotManageQuery);
        
        
        //request.setAttribute("RA_PAGER_ITEMS", robotManageQuery);        
        return robotManageQuery;
    }

	public void setRobotManageService(RobotManageService robotManageService) {
		this.robotManageService = robotManageService;
	}
}
